ScxV6Object.Create Method
Creates a new database object.
Parameters
- Class
The type of object to create.
Remarks
The Create method attempts to create a new database object that is a child of this object.
The creation may fail if:
- The host database object does not represent a group, template, or template instance.
- The user does not have configuration privileges for the host database object.
- The Class parameter does not refer to a createable object class.
- The class of the new database object is not valid in the target group. For example a template cannot be created inside another template.
The Class argument defines what type of object will be created. Common class names include:
Class | Description |
---|---|
CGroup | A database group. |
CMimic | A mimic. |
CPointAlgManual | An internal analogue point. |
CPointDigitalManual | An internal digital point. |
For more information see Database Structure, Schema, Object Names and Identifiers.
The following example written in Visual Basic shows the Create method being used to create a new internal analogue point with a default name:
Dim Svr As ScxV6DbClient.ScxV6Server
Svr = New ScxV6DbClient.ScxV6Server
Svr.Connect("MAIN", "", "")
' Find a folder on the system
Dim Obj As ScxV6DbClient.ScxV6Object
Obj = Svr.FindObject("Group")
' Create the new object
Dim NewObj As ScxV6DbClient.ScxV6Object
NewObj = Obj.Create("CPointAlgManual")
' Disconnect
Svr.Disconnect()